using System;
using System.Collections.Generic;

using Atomic.Libraries;
using Atomic.Libraries.Mathematics;
using Atomic.Libraries.Plotting;
using Atomic.Libraries.Plotting.Functions;

namespace Atomic.Thermodynamics.Phonons
{
	[Serializable]
	public class PhononDispersionBranch
	{
		public PhononDispersionBranch(IEnumerable<PhononDispersionPoint> points)
		{
			Points = new ReadOnlyList<PhononDispersionPoint>(points, (p1, p2) => p1.Distance.CompareTo(p2.Distance));
		}
		
		public void Plot()
		{
			//new LinearInterpolationFunction(new List<PhononDispersionPoint>(Points).ConvertAll<IPlotPoint>(p => new PlaneVector(p.Distance, p.Frequency)));
			//PreparePlot();
			//Gnuplot.Plot((IRangedPlotFunction)function);
		}

		public ReadOnlyList<PhononDispersionPoint> Points
		{
			get;
			private set;
		}
	}
}
